def read_csv(file_path):
    with open(file_path,"r") as file:
        first_line=[]
        list_file=[]
        first_line=file.readline().strip().split(",")##读取第一行后，指针来到第二行
        print(first_line)
        for line in file:
            values=line.strip().split(",")
            row={}
            for i in range(0,len(first_line)):
                row[first_line[i]]=values[i]##[键]用来访问字典的值
            list_file.append(row)
        print(list_file)
file_path='example.csv'
read_csv(file_path)